var output = document.getElementById('output');
var img_obj = document.getElementById('img_obj')

var myInterval = setInterval(function(){
	myTimer();
},3000);


count = 0;

img_src_arr = [
	'lesson2_1.jpeg',
	'lesson2_2.jpeg'
]

function myTimer(){
	var date = new Date();
	var time = date.toLocaleDateString() +'\t'+ date.toLocaleTimeString();
	output.innerHTML = time;
	
	
	img_obj.src = img_src_arr[count];
	
	count++;
	// output.innerHTML = String(count);
	
	if(count>1)
	{
		count = 0;
	}
	
}